package edu.purdue.cs.aggr.message;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

import edu.purdue.cs.aggr.Vertex;

public class VertexTransferMessage extends Message
{
  private Vertex vertex;

  @Override
  public void readExternal(ObjectInput in) throws IOException,
      ClassNotFoundException {
    super.readExternal(in);
    vertex = (Vertex) in.readObject();
  }

  @Override
  public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    out.writeObject(vertex);
  }
  
  public final Vertex getVertex()
  {
    return vertex;
  }

  public final void setVertex(Vertex vertex)
  {
    this.vertex = vertex;
  }
}
